import request from '@/utils/request'

const customerApi = {
  makeTag: 'qw/qwCustomer/makeTag',
  CustomerPage: 'qw/qwCustomer/page',
  getCustomerInfo: 'qw/qwCustomer/getCustomerInfo',
  updateData: 'qw/qwCustomer/syncCustomer',
  exportData: 'qw/qwCustomer/import',
  addLifeCycleLog: 'qw/qwCustomer/addLifeCycleLog',
  customerLifeCycleLogList: 'qw/qwCustomer/customerLifeCycleLogList',
  LifeCycleList: 'qw/qwLifeCycle/list',
  checkRunningSyncTask: 'qw/qwCustomer/checkRunningSyncTask',
  followUserList: 'qw/qwCustomer/followUserList'
}

export function CustomerPage (parameter) {
  return request({
    url: customerApi.CustomerPage,
    method: 'post',
    data: parameter
  })
}

export function getCustomerInfo (parameter) {
  return request({
    url: customerApi.getCustomerInfo,
    method: 'get',
    params: parameter
  })
}

export function updateData (parameter) {
  return request({
    url: customerApi.updateData,
    method: 'get',
    params: parameter
  })
}

export function followUserList (parameter) {
  return request({
    url: customerApi.followUserList,
    method: 'get',
    params: parameter
  })
}

export function exportData (parameter) {
  return request({
    url: customerApi.exportData,
    method: 'get',
    params: parameter
  })
}

export function LifeCycleList (parameter) {
  return request({
    url: customerApi.LifeCycleList,
    method: 'get',
    params: parameter
  })
}

export function addLifeCycleLog (parameter) {
  return request({
    url: customerApi.addLifeCycleLog,
    method: 'post',
    params: parameter
  })
}

export function customerLifeCycleLogList (parameter) {
  return request({
    url: customerApi.customerLifeCycleLogList,
    method: 'get',
    params: parameter
  })
}

export function makeTag (parameter) {
  return request({
    url: customerApi.makeTag,
    method: 'get',
    params: parameter
  })
}

export function checkRunningSyncTask (parameter) {
  return request({
    url: customerApi.checkRunningSyncTask,
    method: 'get',
    params: parameter
  })
}

export default {
  CustomerPage,
  getCustomerInfo,
  updateData,
  exportData,
  LifeCycleList,
  addLifeCycleLog,
  customerLifeCycleLogList,
  makeTag,
  checkRunningSyncTask,
  followUserList

}
